1. Filed of the Invention
This invention relates to a device and a method for judging a driving way, specifically to a driving way judging device and method which judges contours, such as straights, curves, inclines, declines, etc. by image processing.
2. Related Background Art
In order to computer-control the driving of an automobile, it is necessary to recognize in real time the contour of a driving way, such as a road. To this end, it is proposed for example to draw optical or magnetic judging lines on driving ways for an optical sensor or magnetic sensor provided on the automobile to sense the judging lines. But this requires drawing judging lines on driving ways, and the automatic drive control systems for such use are not universal. What is proposed here is taking an image of a driving way by a television camera installed in a vehicle and computer-processing the image data so as to recognize the contour of the driving way in real time. There are various methods for processing the image data. One example of the methods uses Hough transform as described in Japanese Patent Laid-Open Publication No 24310/1987 and Japanese Patent Laid-Open Publication No. 70916/1987. But this method has the following disadvantages. The image data prepared by taking a picture of a driving way includes not only data corresponding to the edges of the driving way but also data of buildings, trees around the driving way and data corresponding to the center line. Accordingly it takes a long data processing time to process the data accurately to distinguish the contour of the driving way. In speeding up the data processing, the computer system has to be complicated and becomes expensive. But what is firstly necessary to perform the automatic drive control of a vehicle is to distinguish the macroscopic contour of a driving way. This macroscopic judgment facilitates microscopic judgment of the contour of the driving way.
On the other hand, in the method described in the above-mentioned references, Hough transform is performed on respective characteristic points on an image taken by the camera to thereby give groups of straight lines corresponding to characteristics of characteristic point distributions. To be specific, the contours of white shoulder lines drawn on the edges of a driving way, the center line at the center thereof, guard rails along the driving way, and buildings along the driving way are given as characteristic points on the image. But the straight line groups include such a large number of straight lines that it is not easy to judge which straight lines correspond to the edges of the driving way. However, it is necessary, especially to the case where this method is adapted to an automobile drive control, to recognize the contour of a driving way in real time. Accordingly straight lines corresponding to the edges of the driving way have to be extracted in a very short period of time. But it has been difficult for the above-described method to perform such extraction.
Although a large number of straight lines are thus obtained, they include a number of straight lines having different attributes, i.e., a number of straight lines having different positions and directions. This makes it difficult to judge a direction of continuous run of the driving way in the image, i.e., to judge the direction of continuous run of the driving way. When an image of the driving way taken by the camera is studied in terms of straight arrangements of characteristic points, the image has regions in which characteristic straight arrangements of characteristic points appear, and in which they do not clearly appear. Generally it is easy in the former region to extract an approximate straight line to an arrangement of characteristic points. In the latter region it is difficult to extract an approximate straight line. But in the above-described prior art method, basically the data in both regions are processed collectively, not separately. Consequently it has been impossible to distinguish the contour of a driving way at high speed and with ease.
A first object of this invention is to provide a device and method for judging the macroscopic contour of a driving way at high speed and with ease.
A second object of this invention is to provide a device and a method for extracting at high speed and with ease a pair of straight lines opposed to each other on the right and left edges of a driving way, based on a number of straight lines obtained by processing image data.
A third object of this invention is to provide a device and a method for accurately judging inclines, declines and curves of a driving way, based on positional relationships between a pair of straight lines corresponding to the edges of the driving way.